{load_language_text section="checkout_paypal"}
{load_language_text section="buttons" name="button"}
{load_language_text section="checkout_payment" name="payment"}
{config_load file="$language/gm_lang_$language.conf" section="lightbox"}

{if $LIGHTBOX == 'true'}<div id="lightbox_content" style="display:none">{/if}
	<div class="checkout_paypal{if $LIGHTBOX == 'true'} lightbox_block{/if}">
		<div class="process_bar">
			<ul>
				<li><label><span>{$txt.text_shoppingcart}</span></label></li>
				<li class="active"><label><span>{$txt.text_orderconfirm}</span></label></li>
			</ul>
		</div>
		<h1>{$txt.heading_checkout}</h1>

		{if $error!=''}
			<div class="text_information errorText">
				{$error}
			</div>
		{/if}

		<div class="cols2">
			{if $ADDRESS_SHIPPING_LABEL}
				<div class="col">
					<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" /> {$txt.title_shipping_address}</h2>
					<p>{$ADDRESS_SHIPPING_LABEL}</p>
					{if $SHIPPING_ADDRESS_EDIT}<p><a class="button_blue button_set" href="{$SHIPPING_ADDRESS_EDIT}"><span class="button-outer"><span class="button-inner">{$button.address_change}</span></span></a></p>{/if}
				</div>
			{/if}
			<div class="col last">
				<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" /> {$txt.title_payment_address}</h2>
				<p>{$ADDRESS_PAYMENT_LABEL}</p>
				{if $BILLING_ADDRESS_EDIT}<p><a class="button_blue button_set" href="{$BILLING_ADDRESS_EDIT}"><span class="button-outer"><span class="button-inner">{$button.address_change}</span></span></a></p>{/if}
			</div>
			
		</div>

		{if $ADDRESS_SHIPPING_LABEL}
			<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" />{$txt.title_shipping}</h2>
			<div class="order_shipping">
				<form id="{$shipping_form_data.ID}" action="{$shipping_form_data.ACTION}" method="{$shipping_form_data.METHOD}">
					<input type="hidden" name="{$shipping_hidden_data.NAME}" value="{$shipping_hidden_data.VALUE}" />
					{$SHIPPING_BLOCK}
					{foreach name=payment_hidden item=hidden_field from=$payment_hidden_fields_data}
					<input type="hidden" name="{$hidden_field.NAME}" value="{$hidden_field.VALUE}" />
					{/foreach}
				</form>
			</div>
		{/if}

		<h2 class="underline overline">
			<img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" />
			{$txt.text_products}
		</h2>
		
		<table cellspacing="0" class="order_history_list">
			<tr class="row_0 first">
				<th class="col_0">{$txt.head_units}</th>
				<th class="col_1">{$txt.head_products}</th>
				<th class="col_2">{$txt.head_artnr}</th>
				<th class="col_3">{$txt.head_single_price}</th>
				<th class="col_4">{$txt.head_price}</th>
			</tr>

			 {foreach name=aussen item=data from=$products_data}
			<tr class="article">
				<td class="col_0">{$data.qty} x</td>
				<td class="col_1">
					{$data.name}
					<em>
					{foreach key=a_data item=attrib_data from=$data.attributes}
						<br />{$attrib_data.option}: {$attrib_data.value}
					{/foreach}
					</em>
				</td>
				<td class="col_2">{$data.model}</td>
				<td class="col_3">{$data.price_formated}</th>
				<td class="col_4">{$data.final_price_formated}</td>
			</tr>
			{/foreach}

			{foreach name=order_total_values item=order_total_values from=$total_block}
			<tr class="calculation{if $smarty.foreach.order_total_values.last} total{/if}">
				<td colspan="3"></td>
				<td class="col_3">{$order_total_values.title}</td>
				<td class="col_4">{$order_total_values.text}</td>
			</tr>
			{/foreach}

		</table>

		<form id="{$checkout_form_data.ID}" action="{$checkout_form_data.ACTION}" method="{$checkout_form_data.METHOD}">

			<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" />{$payment.title_comments}</h2>
			<div class="remarks">
				<p>{$payment.text_comments}</p>

				<textarea id="comments_textarea" name="{$COMMENTS_NAME}" wrap="{$COMMENTS_WRAP}" class="input-textarea">{$COMMENTS_VALUE}</textarea>
				<input type="hidden" name="{$COMMENTS_HIDDEN_NAME}" value="{$COMMENTS_HIDDEN_VALUE}" />
			</div>

			{if $WITHDRAWAL}
			<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" /> {$payment.title_withdrawal}</h2>
			<div class="remarks">
				{if $CHECKBOX_WITHDRAWAL}
					<p>{$payment.text_withdrawal}</p>
				{/if}
				{if $WITHDRAWAL_IFRAME == 1}
					<iframe src="{$WITHDRAWAL_IFRAME_URL}"></iframe>
				{else}
					<textarea name="{$withdrawal_data.NAME}" class="input-textarea {$withdrawal_data.CLASS}" readonly="readonly">{$withdrawal_data.TEXT}</textarea>
				{/if}

				{if $withdrawal_checkbox_data}
					<div class="accept_box"><div class="accept_box_checkbox"><input class="accept_box_checkbox" type="checkbox" name="{$withdrawal_checkbox_data.NAME}" value="{$withdrawal_checkbox_data.VALUE}" {if $withdrawal_checkbox_data.CHECKED == 1}checked="checked" {/if} /></div><div class="accept_box_text">{$payment.text_accept_withdrawal}</div></div>
				{/if}
			</div>
			{/if}

			{if $AGB}
			<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" /> {$payment.title_agb}</h2>
			<div class="remarks">
				{if $CHECKBOX_AGB}
					<p>{$payment.text_agb}</p>
				{/if}
				{if $AGB_IFRAME == 1}
					<iframe src="{$AGB_IFRAME_URL}"></iframe>
				{else}
					<textarea name="{$conditions_data.NAME}" class="input-textarea {$conditions_data.CLASS}" readonly="readonly">{$conditions_data.TEXT}</textarea>
				{/if}

				{if $conditions_checkbox_data}
					<div class="accept_box"><div class="accept_box_checkbox"><input class="accept_box_checkbox" type="checkbox" name="{$conditions_checkbox_data.NAME}" value="{$conditions_checkbox_data.VALUE}" {if $conditions_checkbox_data.CHECKED == 1}checked="checked" {/if} /></div><div class="accept_box_text">{$payment.text_accept_agb}</div></div>
				{/if}
			</div>
			{/if}
			
			{if !$error}<div class="checkout_button"><a href="{page_url}#" class="button_green_big button_set_big paypal_action_submit"><span class="button-outer"><span class="button-inner">{$button.send_order}</span></span></a></div>{/if}

		</form>
	</div>
{if $LIGHTBOX == 'true'}
	<a href="{$LIGHTBOX_CLOSE}" class="icon_lightbox_close_checkout button_close_lightbox" title="{$button.close}">{$button.close}</a>
</div>
{/if}